#朴素贝叶斯实现形式
import pandas as pd
df = pd.DataFrame([[0,1],[1,1],[2,1],[3,-1],[4,-1],
                   [5,-1],[6,1],[7,1],[8,1],[9,-1]])
X = df[[0]]
Y = df[1]
from sklearn.naive_bayes import MultinomialNB
from sklearn.tree import DecisionTreeClassifier
model = MultinomialNB()
model.fit(X,Y)
print(Y.values.T)
print(model.predict(X))


